package com.lc.luzhengtang.conn;

import com.google.gson.Gson;
import com.lc.luzhengtang.bean.CommenBean;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

import java.io.File;

/**
 * Created by Administrator on 2017/6/9.
 */
@HttpInlet(Conn.PERSONAL_PIC)
public class JsonSetavatar extends BaseAsyPost<CommenBean> {

    public String member_id;

    public File avatar;

    public JsonSetavatar(String member_id,File avatar, AsyCallBack<CommenBean> asyCallBack) {
        super(asyCallBack);
        this.member_id = member_id;
        this.avatar = avatar;
    }

    @Override
    protected CommenBean parser(JSONObject object) throws Exception {
        Gson gson = new Gson();
        CommenBean loginBean = new CommenBean();
        loginBean = gson.fromJson(object.toString(), CommenBean.class);
        return loginBean;
    }

}
